Manipulating HTTP Headers

Manipulating HTTP Headers

am 10.02.2007 12:57:18 von fzarabozo

This is a multi-part message in MIME format.

--===============1620730195==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0031_01C74CD8.524F15B0"

This is a multi-part message in MIME format.

------=_NextPart_000_0031_01C74CD8.524F15B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi All,

I need to write some function to authenticate a visitor using HTTP =
Authentication, matching his login information with another server. =
Here's the idea more clear:

1. A visitor enters www.myserver.com
2. He gets on his screen the user/password HTTP Authentication window =
and tries to login
3. The script should take the provided login information and send it to =
www.anotherserver.com just to check if an authentication success can be =
done using that login information.
4. The script then grants or deny access to the user, based on point 3.

I know how to match the login information using LWP::UserAgent, but i =
can't find the way to force Apache to send a controlled 401 response or =
a way to make the user's browser open the HTTP Authentication window. =
Also, i can't find a way to catch the login information to process it =
and let Perl decide if it is a success login or not.

If it's worth for something, i'm using Apache 2.2 with mod_perl 2.0 and =
Perl 5.8.

Please, if someone can help me understanding how to accomplish this =
task, i'll really appreciate it.

Thank you! :-)

Paco


------=_NextPart_000_0031_01C74CD8.524F15B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



charset=3Diso-8859-1">




Hi All,

 

I need to write some function to =
authenticate a=20
visitor using HTTP Authentication, matching his login information with =
another=20
server. Here's the idea more clear:

 

1. A visitor enters href=3D"http://www.myserver.com">www.myserver.com

2. He gets on his screen the =
user/password HTTP=20
Authentication window and tries to login

3. The script should take the provided =
login=20
information and send it to href=3D"http://www.anotherserver.com">www.anotherserver.com just to =
check if=20
an authentication success can be done using that login =
information.

4. The script then grants or deny =
access to the=20
user, based on point 3.

 

I know how to match the login =
information using=20
LWP::UserAgent, but i can't find the way to force Apache to send a =
controlled=20
401 response or a way to make the user's browser open the HTTP =
Authentication=20
window. Also, i can't find a way to catch the login information to =
process it=20
and let Perl decide if it is a success login or not.

 

If it's worth for something, =
i'm using=20
Apache 2.2 with mod_perl 2.0 and Perl 5.8.

 

Please, if someone can help me =
understanding how to=20
accomplish this task, i'll really appreciate it.

 

Thank you! :-)

 

Paco

 

 


------=_NextPart_000_0031_01C74CD8.524F15B0--


--===============1620730195==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1620730195==--

Re: Manipulating HTTP Headers

am 10.02.2007 22:53:19 von gnu valued customer

--===============0714155934==
Content-Type: multipart/alternative; boundary="0-218234798-1171144399=:77268"
Content-Transfer-Encoding: 7bit

--0-218234798-1171144399=:77268
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Paco,

Grab http-sniffer.pl by Tim Meadowcroft so you can see the actual headers=
:

http://schmerg.pwp.blueyonder.co.uk/code.htm

then look over rfc 2617 to decide if you want to use basic or digest auth=
entication.

There are many perl examples for doing this in cgi perl -- google for the=
m.

good luck,
Mark

=20
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
--0-218234798-1171144399=:77268
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Paco,

Grab http-sniffer.pl by Tim Meadowcroft so you can see the a=
ctual headers:

..htm">http://schmerg.pwp.blueyonder.co.uk/code.htm

then look o=
ver rfc 2617 to decide if you want to use basic or digest authentication.=


There are many perl examples for doing this in cgi perl -- google=
for them.

good luck,
Mark




It's here! Your new message!
Get
com/toolbar/features/mail/"> new email alerts with the free "
http://us.rd.yahoo.com/evt=3D49938/*http://tools.search.yaho o.com/toolbar=
/features/mail/">Yahoo! Toolbar.

--0-218234798-1171144399=:77268--

--===============0714155934==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0714155934==--

script to generate a simple chart

am 11.02.2007 02:41:48 von Rajeev Prasad

This is a multi-part message in MIME format.

--===============1106672872==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000C_01C74D4B.80E6BE00"

This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C74D4B.80E6BE00
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello all,



I am thinking to write a simple (!) script in perl to generate a chart
joining objects. Very much like a flow chart. Has anyone done this before?
Is it possible?



O1

|

|

|

O3<-------------- O---------------> O2



and more objects..





How do we do this?



Thank you.

Rajeev


------=_NextPart_000_000C_01C74D4B.80E6BE00
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable




charset=3Dus-ascii">









style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Hello all,



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I am thinking to write a simple (!) =
script
in perl to generate a chart joining objects. Very much like a flow =
chart. Has anyone
done this before? Is it possible?



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
O1



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
|



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
|



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>      =
            &=
nbsp;    
|



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>O3
color=3Dnavy
face=3DWingdings> style=3D'font-size:10.0pt;font-family:Wingdings;color:navy'> ß >
size=3D2 color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;
color:navy'>------------ O-------------
color=3Dnavy
face=3DWingdings> style=3D'font-size:10.0pt;font-family:Wingdings;color:navy'> à n>
size=3D2 color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;
color:navy'> O2



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>…and more =
objects….



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>How do we do =
this?



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> 



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thank you.



style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Rajeev









------=_NextPart_000_000C_01C74D4B.80E6BE00--


--===============1106672872==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1106672872==--